package com.mt.api.modules.manager.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mt.api.modules.domain.AppBossSetup;
import com.mt.api.modules.manager.IBossSetupManager;
import com.mt.api.modules.mapper.AppBossSetupMapper;
import org.springframework.stereotype.Component;

/**
 * @Author: plover
 * @Date: 2022-01-02
 * @Description:
 */
@Component
public class BossSetupManagerImpl extends ServiceImpl<AppBossSetupMapper, AppBossSetup> implements IBossSetupManager {

    @Override
    public AppBossSetup getBossSetupByBossId(Integer bossId) {
        LambdaQueryWrapper<AppBossSetup> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(AppBossSetup::getBossId, bossId)
                .last("limit 1");
        return baseMapper.selectOne(wrapper);
    }

}
